﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>简单示例</title>
    <link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
    <script type="text/javascript" src="lib/jquery.js"></script>
    <script type="text/javascript" src="jquery.autocomplete.js"></script>
    <script type="text/javascript">
    $(function(){
        var data = "the People's Republic of China".split(" ");
        $("#autocomplete").autocomplete(data,{minChars:0}).result(function(event,data,formatted){
            alert(data);
        });
    });
    </script>
</head>
<body>
    <!--参考：http://blog.csdn.net/lqh4188/article/details/43017937-->
    <input type="text" id="autocomplete" />
</body>
</html>